<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        .outer, .outerTwo {
            width: 200px;
            border: 1px solid black;
            height: 100px;
            margin: 10px;
        }

        .red {
            width: 100px;
            height: 100px;
            background: red;
            position: relative;
            float: left;
            left: 50px;
        }

        .green {
            width: 100px;
            height: 100px;
            background: green;
            float: left;
        }

        .outerTwo div {
            width: 100px;
            height: 100px;
            float: left;
        }

        .outerTwo {
            position: relative;
        }

        .orange {
            background: orange;
            position: absolute;
            right: 0;
            bottom: 0;
        }

        .outerTwo .outerThree {
            width: 50px;
            height: 50px;
            border: 1px solid black;
            position: absolute;
            left: 20px;
            bottom: 20px;
            /*z-index:1;  谁大谁在上面 */
        }

        .pink {
            background: pink;
        }

    </style>
</head>
<body>
<div class="outer">
    <div class="red"></div>
    <div class="green"></div>
</div>
<div class="outerTwo">
    <div class="outerThree"></div>
    <div class="orange"></div>
    <div class="pink"></div>
</div>
</body>
</html>